[Custom Descriptors] Optimize RefCast to RefCastDesc in GlobalStructInference#7906
[Custom Descriptors] Optimize RefCast to RefCastDesc in GlobalStructInference#7906kripken merged 13 commits intoWebAssembly:mainfrom
Conversation
tlively
left a comment
There was a problem hiding this comment.
It's not enough to check that we have a single global for the descriptor type; we must also check that there are no allocations of that descriptor type besides the initializer for that one global.
|
That is something the pass verifies, binaryen/src/passes/GlobalStructInference.cpp Lines 113 to 115 in 46b37d3 Unless I misunderstood you? |
|
Great, I had forgotten we already did that. |
|
There are some TODOs here, but the larger question is whether this seems worthwhile. I see a 1% code size regression on j2cl for example - do we expect the benefit to be larger than that? @tlively @jakobkummerow |
|
This is primarily a performance improvement. |
|
Makes sense, but do we think it is fast enough to justify a 1% size regression? Given that iiuc we think the VM can do much of this too. |
|
This should only be run at the very end, manually - running it in every |
|
@tlively rebased and put behind a pass-arg, so that we can land it and continue evaluation. |
No description provided.